<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>css9并级选择器</title>
    <style>
    .rich{
        color: gold;
    }
    .star{
        color: red;
    }
    .dog{
        color: blue;
    }
    .pig{
        color: aqua;
    }
    /* ,为并集选择器 ,最后的不加，*/
    .dog,
    .pig,
    .rich,
    .star
    {
    background-color: gray;
    width: 180px;
    
    }
    </style>
</head>
<body>
   <h2 class="rich">土豪张三</h2>
    <h2 class="star">明星李四</h2> 
    <br>
    <p class="dog">小狗</p>
    <p class="pig">小猪</p>

</body>
</html>